結果

問題 No.176 2種類の切手
ユーザー cielciel
提出日時 2015-04-03 00:55:39
言語 C90
(gcc 11.4.0)
結果
WA  
(最新)
AC  
(最初)
実行時間 -
コード長 214 bytes
コンパイル時間 232 ms
コンパイル使用メモリ 21,120 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-04-16 21:59:11
合計ジャッジ時間 18,136 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 515 ms
5,248 KB
testcase_01 AC 516 ms
5,376 KB
testcase_02 AC 515 ms
5,376 KB
testcase_03 WA -
testcase_04 AC 515 ms
5,376 KB
testcase_05 AC 516 ms
5,376 KB
testcase_06 AC 514 ms
5,376 KB
testcase_07 AC 517 ms
5,376 KB
testcase_08 AC 516 ms
5,376 KB
testcase_09 AC 515 ms
5,376 KB
testcase_10 AC 516 ms
5,376 KB
testcase_11 AC 514 ms
5,376 KB
testcase_12 AC 518 ms
5,376 KB
testcase_13 WA -
testcase_14 AC 517 ms
5,376 KB
testcase_15 WA -
testcase_16 WA -
testcase_17 AC 516 ms
5,376 KB
testcase_18 AC 517 ms
5,376 KB
testcase_19 AC 517 ms
5,376 KB
testcase_20 AC 516 ms
5,376 KB
testcase_21 AC 516 ms
5,376 KB
testcase_22 AC 515 ms
5,376 KB
testcase_23 AC 518 ms
5,376 KB
testcase_24 AC 515 ms
5,376 KB
testcase_25 AC 515 ms
5,376 KB
testcase_26 AC 517 ms
5,376 KB
testcase_27 AC 517 ms
5,376 KB
testcase_28 AC 515 ms
5,376 KB
testcase_29 AC 517 ms
5,376 KB
testcase_30 AC 515 ms
5,376 KB
testcase_31 AC 517 ms
5,376 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c: In function ‘main’:
main.c:4:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    4 |         scanf("%lld%lld%lld",&a,&b,&c);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

ソースコード

diff #

#include <stdio.h>
int main(){
	long long a,b,c,r,s,n=0;
	scanf("%lld%lld%lld",&a,&b,&c);
	int i=0;
	for(r=1<<30;i<5e7;i++){
		long long v=b*i;
		v+=(c-v+a-1)/a*a;
		if(r>v)r=v;
	}
	printf("%lld\n",r);
	return 0;
}
0