Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

Re:发个代码,纪念又一个水题

Posted by 1241227756 at 2014-12-07 16:49:28 on Problem 3619
In Reply To:发个代码,纪念又一个水题 Posted by:huangchang9001 at 2011-12-05 22:29:38
> #include<stdio.h>
> int N,K,S,T,R;
> void main(){
> 	scanf("%d%d",&N,&K);
> 	while(K--){
> 		scanf("%d%d%d",&S,&T,&R);
> 		printf("%d\n",N%(S*T)==0?(T+R)*(N/(S*T))-R:(T+R)*(N/(S*T))+(N%(S*T))/S+(((N%(S*T))%S)==0?0:1));
> 	}
> }

Followed by:

Post your reply here:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator