結果
| 問題 |
No.1828 Except 3
|
| ユーザー |
FF256grhy
|
| 提出日時 | 2022-02-01 22:14:41 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 3 ms / 2,000 ms |
| コード長 | 736 bytes |
| コンパイル時間 | 2,378 ms |
| コンパイル使用メモリ | 213,280 KB |
| 最終ジャッジ日時 | 2025-01-27 18:18:16 |
|
ジャッジサーバーID (参考情報) |
judge5 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 16 |
ソースコード
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
#pragma GCC optimize("inline")
#include<bits/stdc++.h>
using namespace std;
inline int my_getchar_unlocked(){
static char buf[1048576];
static int s = 1048576;
static int e = 1048576;
if(s == e && e == 1048576){
e = fread_unlocked(buf, 1, 1048576, stdin);
s = 0;
}
if(s == e){
return EOF;
}
return buf[s++];
}
int main() {
long long a = 1;
int s = 0, m = 0, f = 0;
while(true) {
char c = my_getchar_unlocked();
if(c == EOF) { printf("%lld\n", a); exit(0); }
if('0' <= c && c <= '9') {
m += c;
} else {
if(m % 3 != 0) { s++; }
m = 0;
if(c == '\n') {
if(f == 0) { f = 1; } else { a *= s; }
s = 0;
}
}
}
}
FF256grhy