Submission #00110
ソースコード
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | #include<stdio.h> signed main(){ long long n,b,i,z=0,a=998244353; char c[1]; scanf ( "%lld" ,&n); for (i=0;i<n;i++){ scanf ( "%s %lld" ,c,&b); if (b!=0){ b=b%a; } if (b<0){ b +=a; } if (c[0]== '+' ){ z=z+b; } if (c[0]== '-' ){ z=z-b; } if (c[0]== '*' ){ z=z*(b%a)%a; } if (z!=0){ z %=a; } if (z<0){ z +=a; } } printf ( "%lld\n" ,z); return (0); } |
ステータス
項目 | データ |
---|---|
問題 | 0005 - Modulo Calculation |
ユーザー名 | ei2037 |
投稿日時 | 2020-07-14 17:35:16 |
言語 | C |
状態 | Wrong Answer |
得点 | 0 |
ソースコード長 | 604 Byte |
最大実行時間 | 93 ms |
最大メモリ使用量 | 716 KB |
セット
セット | 得点 | Cases | |
---|---|---|---|
1 | ALL | 0 / 50 | * |
テストケース
ファイル名 | 状態 | 実行時間 | メモリ使用量 | # |
---|---|---|---|---|
input01 | AC | 25 ms | 376 KB |
1
|
input02 | WA | 16 ms | 396 KB |
1
|
input03 | WA | 38 ms | 316 KB |
1
|
input04 | WA | 19 ms | 372 KB |
1
|
input05 | WA | 59 ms | 424 KB |
1
|
input06 | WA | 19 ms | 476 KB |
1
|
input07 | WA | 48 ms | 428 KB |
1
|
input08 | WA | 22 ms | 452 KB |
1
|
input09 | WA | 43 ms | 372 KB |
1
|
input10 | WA | 20 ms | 424 KB |
1
|
input11 | WA | 46 ms | 380 KB |
1
|
input12 | WA | 19 ms | 400 KB |
1
|
input13 | WA | 76 ms | 456 KB |
1
|
input14 | WA | 13 ms | 504 KB |
1
|
input15 | WA | 21 ms | 556 KB |
1
|
input16 | AC | 44 ms | 512 KB |
1
|
input17 | WA | 80 ms | 532 KB |
1
|
input18 | WA | 19 ms | 460 KB |
1
|
input19 | WA | 68 ms | 512 KB |
1
|
input20 | WA | 33 ms | 568 KB |
1
|
input21 | WA | 71 ms | 496 KB |
1
|
input22 | WA | 71 ms | 424 KB |
1
|
input23 | WA | 75 ms | 476 KB |
1
|
input24 | WA | 89 ms | 528 KB |
1
|
input25 | WA | 46 ms | 452 KB |
1
|
input26 | WA | 39 ms | 380 KB |
1
|
input27 | WA | 51 ms | 428 KB |
1
|
input28 | WA | 22 ms | 480 KB |
1
|
input29 | WA | 65 ms | 528 KB |
1
|
input30 | WA | 35 ms | 476 KB |
1
|
input31 | WA | 93 ms | 620 KB |
1
|
input32 | WA | 87 ms | 668 KB |
1
|
input33 | WA | 26 ms | 716 KB |
1
|
input34 | WA | 36 ms | 672 KB |
1
|
input35 | WA | 20 ms | 600 KB |
1
|
input36 | WA | 24 ms | 488 KB |
1
|
input37 | WA | 81 ms | 536 KB |
1
|
input38 | WA | 92 ms | 496 KB |
1
|
input39 | WA | 84 ms | 544 KB |
1
|
input40 | WA | 84 ms | 564 KB |
1
|
input_sample01 | WA | 24 ms | 620 KB |
1
|
input_sample02 | WA | 15 ms | 668 KB |
1
|